<template>
  <div><page-list :x-uri="uri" :x-tabs="tabs" :doactions="doactions" :custom-components="custom" :checkbox-item="false" /></div>
</template>

<script>
import PageList from '@public/template/page_list.vue';
import Price from './components/price.vue';

export default {
  components: {
    PageList
  },
  inject: ['reload'],
  data() {
    return {
      uri: '/admin/finance/split/user',
      tabs: [
        {
          title: '分成明细',
          uri: '/finance/split/list',
          meta: {
            permission: 'finance.split.list'
          }
        },
        {
          title: '用户分成',
          uri: '/finance/split/user',
          meta: {
            permission: 'finance.split.user'
          }
        }
      ],
      doactions: [
        { title: '分成流水', meta: { permission: 'finance.split.flow' }, callback: this.flow }
      ],
      custom: {
        amount: Price,
        frozen: Price
      }
    };
  },
  methods: {
    primary: function({ row }) {
      // this.$router.push({ path: '/finance/split/flow/' + row.user_id });
    },
    flow: function({ row }) {
      this.$router.push({ path: '/finance/split/flow/' + row.user_id });
    }
  }
};
</script>
